create or replace view vac_lov as
with lv as
(
 select
 workspace,
 application_id,
 application_name,
 list_of_values_name,
 lov_type,
 list_of_values_query list_of_values_query,
 to_char(lov_entries) lov_entries,
 is_subscribed,
 subscribed_from,
 last_updated_by,
 last_updated_on,
 component_comment,
 lov_id,
 referenced_lov_id
 from APEX_APPLICATION_LOVS t
)
 select workspace,
        application_id,
        application_name,
        list_of_values_name,
        last_updated_by,
        last_updated_on,
        lov_id,
        referenced_lov_id,
        u_name,
        u_value,
        'APEX_APPLICATION_LOVS' src_view_name
 from lv
  UNPIVOT INCLUDE NULLS (
   u_value
   FOR    u_name
   IN
   (
     lov_type,
     list_of_values_query,
     lov_entries,
     is_subscribed,
     subscribed_from,
     component_comment
   )
  );

